README FILE 

PAPER: MEASURING PREFERENCES FOR INCOME EQUALITY AND MOBILITY

AUTHORS: BERNARDO LARA E., KENNETH A. SHORES

JOURNAL: REVIEW OF ECONOMICS AND STATISTICS

SOFTWARE: STATA 17 SE (WINDOWS OR MAC)

Here we explain folder structure, code and data locations, and code layout.

Primary folder is called "ReStat Replication and Publication Materials"

Feel free to rename this folder and set your directory to its location.

Within this folder are four additional folders: 
1. code: contains replication code
2. data: contains datasets needed for replication
3. manuscript: contains manuscript with tables and figures
4. output: contains tables and figures 

Detailed comments for each sub-folder are provided below.

1 CODE 

replication_randomization_values.do

This code takes data from the CPS and equal opportunity project and identifies cut points at different percentiles for  income inequality (CPS) and income mobility (equal opportunity project). We obtain 10th, 50th, and 90th income percentiles 
by regressing those income levels against income inequality and predict income levels at the 10th - 90th percentiles of the income inequality ratio distribution. These predicted values are randomly assigned in the discrete choice experiment, along with income mobility, and calculated average income.


replication code all tables and figures_8.3.2022.do

This code generates all tables and figures in the manuscript and appendices. In most cases, this code uses the dataset  preferred_sampleRR_uniwts.dta, which is the dataset from our primary MTurk sample and includes weights based on our quota goals, as described in the paper. Note that the data repeat observations for each survey respondent 4 times, as respondents received the  same DCE 4 times. The dependent variable is response_q and is a binary indicator set to 1 if the respondent chose society A over society B. 

To estimate marginal effects and calculate statistics for average income, we use the following predictors:
avginc_q  mob_q iir_q 
These variables represent the log ratio of randomly assigned (i) income, (ii) mobility, and (iii) income inequality ratio, respectively, where the numerator is for society A and denominator is for society B. 

To estimate marginal effects and calculate statistics for median income and other income percentiles, we use the following predictors:
p90inc_q  p50inc_q  p10inc_q  mob_q 
These variables represent the log ratio of randomly assigned (i) 90th percentile income, (ii) 50th percentile income, (iii) 10th percentile income, and (iv) mobility, respectively, where the numerator is for society A and denominator is for society B. 

Demographic variables are used to test for heterogeneity and are labeled and defined to be interpretable.

For the adaptive survey, there is only one response per respondent, so it is necessary to use the first observation of data per respondent.

The dependent variable for the adaptive survey are mobMRS and incineqMRS, which represent the MRS at intervals 1 through 8 for mobility and income inequality, respectively. 

Please note that for all tables and figures, we estimate the marginal effects, MRS, WTP, and (when applicable) test statistics. These values are always reported in the .tex output files. However, in the manuscript, for reasons of space, we do not always include the marginal effects, WTP, or test statistics in the main tables; other information is reported in corresponding appendix tables. In effect, the replication code will always generate statistics viewable in the main regression output tables plus other statistics that are only viewable in corresponding appendix tables.

2. DATA

There are four datasets in the data folder.

The dataset we use for nearly main tables and figures is preferred_sampleRR_uniwts.dta, which as we said above represents our primary sample of data and weights based on the univariate distribution of our quotas.

We include three additional data files (see Table A.9 for results):
	full_sampleRR_uniwts  
	preferred_sampleRR_uniwts_plus 
	preferred_sampleRR_uniwts_plus_educ 
	
full_sampleRR_uniwts.dta ==> this dataset includes an extra 209 respondents that provided data after our quota was filled. the weights are the same as as we used in the main paper, but are generated using the additional observations. 

preferred_sampleRR_uniwts_plus ==> this dataset has the same sample as our primary dataset but includes a sampling weight derived from our quota variables plus education and age.

preferred_sampleRR_uniwts_plus_educ ==> this dataset has the original sample as our primary dataset but adds new sample where we invited only respondents with educations less than college; weights are then generated based on original quotas plus education and age.

The weight variable name in each dataset is called rakedwgt.

3. MANUSCRIPT

Manuscript with tables and figures, including appendix.

4. OUTPUT

Tables and figures are output to this folder. If you set the path directory correctly, all output will go to this folder. Please note that tables contain all output, including output
that was moved to appendix for purposes of space. 

